package com.GraduationDesign.backend.config;

import com.GraduationDesign.backend.utils.SnowFlakeUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;
import java.util.Objects;


/**
 * @author DestinyCc
 */
@Configuration
public class AppNameConfig {
    @Value("${spring.application.name:backend}")
    private String appName;

    @PostConstruct
    public void init() {
        SnowFlakeUtil.initSnowflake(appName);
    }
}
